<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>3D旋转</title>
    <style>
        body{
            perspective: 500px;
        }
        img{
            display: block;
            margin: 200px auto;
        }
        img:hover{
            transform: rotate3d(45deg,0,0);
        }
    </style>
</head>
<body>
    <img src="pig.jpg" alt="">
</body>
</html>